namespace Csharp01._0916;

public class Phone
{
    // 手机品牌
    public string Brand { get; set; } = "苹果6SPlus";
    
    // 手机重量(克)
    public double Weight { get; set; } = 192;
    
    // 后置摄像头像素
    public long CameraPixels { get; set; } = 120000000;
    
    // 手机价格
    public decimal Price { get; set; } = 6288;
    
    // 构造函数
    public Phone()
    {
        
    }
    
    // 带参数的构造函数
    public Phone(string brand, double weight, long cameraPixels, decimal price)
    {
        Brand = brand;
        Weight = weight;
        CameraPixels = cameraPixels;
        Price = price;
    }
    
    // 打印手机信息
    public void PrintInfo()
    {
        Console.WriteLine($"品牌: {Brand}");
        Console.WriteLine($"重量: {Weight}g");
        Console.WriteLine($"后置摄像头像素: {CameraPixels}");
        Console.WriteLine($"价格: {Price:C}");
    }
}